

//接口层的axiso  依赖于工具层的axiso   页面层的axiso依赖于接口层
import axios from "@/utlis/request.js";


// 商品分类
// /goods/catelist
export const catelistRrq = (currentPage = 1, pageSize = 9999) => axios.get('/goods/catelist', {
    params: {
        currentPage,
        pageSize
    }
})

// 商品添加
export const goodsAddReq = (data) => axios.post('/goods/add', data)



// 获取商品列表
// /goods/list
export const goodsListReq = (params) => axios.get('/goods/list', { params })



// /goods/edit 修改商品接口
export const GoodsEdit = (data) => axios.post('/goods/edit', data)


// 商品分类接口
// /goods/catelist
export const GoodCatelistReq = (params) => axios.get('/goods/catelist', {
    params


})


// /goods/editcate  编辑分类
export const GoodsEditcateReq = (data) => axios.post('/goods/editcate', data)


// /goods/delcate  删除分类接口
export const GoodsDelcate = (id) => axios.get('/goods/delcate', {
    params: { id }
}
)